package com.eas.biz.service.examResult.domain;

import java.util.HashMap;
import java.util.Map;

import com.eas.biz.service.exam.domain.Exam;

public class ExamResult {

    private long examId;

    private Exam examInfo;

    private long studentId;

    private long classId;

    private long schoolId;

    private float score;

    private int classRank;

    private int schoolRank;

    private Map<String, ExamSubjectResult> subjectResultMap;

    public ExamResult() {
        subjectResultMap = new HashMap<String, ExamSubjectResult>();
    }

    public void addExamSubjectResult(ExamSubjectResult result) {
        if (result != null) {
            subjectResultMap.put(result.getSubject(), result);
        }
    }

    public ExamSubjectResult getSubjectResult(String subject) {
        return subjectResultMap.get(subject);
    }

    public long getExamId() {
        return examId;
    }

    public void setExamId(long examId) {
        this.examId = examId;
    }

    public long getStudentId() {
        return studentId;
    }

    public void setStudentId(long studentId) {
        this.studentId = studentId;
    }

    public float getScore() {
        return score;
    }

    public void setScore(float score) {
        this.score = score;
    }

    public Map<String, ExamSubjectResult> getSubjectResultMap() {
        return subjectResultMap;
    }

    public long getClassId() {
        return classId;
    }

    public void setClassId(long classId) {
        this.classId = classId;
    }

    public int getClassRank() {
        return classRank;
    }

    public void setClassRank(int classRank) {
        this.classRank = classRank;
    }

    public int getSchoolRank() {
        return schoolRank;
    }

    public void setSchoolRank(int schoolRank) {
        this.schoolRank = schoolRank;
    }

    public long getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(long schoolId) {
        this.schoolId = schoolId;
    }

    public void setSubjectResultMap(Map<String, ExamSubjectResult> subjectResultMap) {
        this.subjectResultMap = subjectResultMap;
    }

    public Exam getExamInfo() {
        return examInfo;
    }

    public void setExamInfo(Exam examInfo) {
        this.examInfo = examInfo;
    }

}
